<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@include file="/inner/head.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<style type="text/css">
<!--
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}
.STYLE1 {
	color: #e1e2e3;
	font-size: 12px;
}
.STYLE6 {color: #000000; font-size: 12; }
.STYLE10 {color: #000000; font-size: 12px; }
.STYLE19 {
	color: #344b50;
	font-size: 12px;
}
.STYLE21 {
	font-size: 12px;
	color: #3b6375;
}
.STYLE22 {
	font-size: 12px;
	color: #295568;
}
-->
</style>
<script>
	function update(){
		if(!$("#name").val()){
			jError("类别名称不能为空",null, function(r){
				$("#name").focus();
			});
			return false;
		}
		var url="${basepath}/channel?m=update";
		var options = {
			url: url,
			type: 'post',
			dataType: 'json',
			success: function(data){
				if(data!=null)
					jError(data.msg);
				else{
					jSuccess("修改成功!", null, function(r){
						channelform.reset();
						parent.frames["channelleft"].location.href="${basepath}/channel?m=search";
						parent.frames["channelmain"].location.href="${basepath}/inner/welcome.jsp";
					});
	            }
			}
		};
		$("#channelform").ajaxSubmit(options);
	}
</script>
</head>
<body>
  <form id="channelform" name="channelform">
  <input type="hidden" id="parentId" name="parentId" value="${channel.parentId}">
  <input type="hidden" id="id" name="id" value="${channel.id}">
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  	<tr>
      <td height="30">
      	<table width="100%" border="0" cellspacing="0" cellpadding="0">
      	  <tr>
        	<td height="24" bgcolor="#353c44">
        	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
          	    <tr>
            	  <td>
            	    <table width="100%" border="0" cellspacing="0" cellpadding="0">
              		  <tr>
                	    <td width="2%" height="19" valign="bottom"><div align="left"><img src="${basepath}/res/image/tb.gif" width="14" height="14" /></div></td>
                	    <td width="98%" valign="bottom"><span class="STYLE1"> 修改类别</span></td>
              		  </tr>
            	    </table>
            	  </td>
          	    </tr>
        	  </table>
            </td>
      	  </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td>
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
       	  <tr>
        	<td height="30" width="20%" bgcolor="#FFFFFF" class="STYLE19" align="right">上级类别：</td>
        	<td bgcolor="#FFFFFF" class="STYLE19" align="left">&nbsp;${param.channelname}</td>
      	  </tr>
      	  <tr>
        	<td height="30" width="20%" bgcolor="#FFFFFF" class="STYLE19" align="right">类别名称：</td>
        	<td bgcolor="#FFFFFF" class="STYLE19" align="left">&nbsp;&nbsp;<input id="name" name="name" title="用户名" value="${channel.name}"><font color="red">&nbsp;*</font></td>
      	  </tr>
      	  <tr>
        	<td width="20%" bgcolor="#FFFFFF" class="STYLE19" align="right">类别备注：</td>
        	<td bgcolor="#FFFFFF" class="STYLE19" align="left">&nbsp;<textarea rows="5" cols="40" id="remark" name="remark" style="margin-top: 5px;margin-bottom: 5px;" title="备注">${channel.remark}</textarea> </td>
      	  </tr>
      	  <tr>
        	<td height="100" width="20%" bgcolor="#FFFFFF" class="STYLE19" align="center" colspan="2"> 
        	  <img src="${basepath}/res/image/qd.jpg" width="59" height="22" onclick="update();" title="确定" style="cursor: pointer;">
        	  <img src="${basepath}/res/image/cz.jpg" width="59" height="22" onclick="channelform.reset();" title="重置" style="cursor: pointer;">
        	</td>
      	  </tr>
  		</table>
  	  </td>
  	</tr>
  </table>
  </form>
</body>

